#ifndef _TAB_FILE_H_
#define _TAB_FILE_H_

#include "baselib\tabfile_edit.h"

struct TAB_FILE_CONFIG
{
	int				nStartRow;
	std::string		strName;
	std::string		strGroup;
};

class CTabFileCenter
{
public:
	CTabFileCenter();
	~CTabFileCenter();

	bool Init(void);
	bool UnInit(void);

	static CTabFileCenter& GetInstance(void) {return ms_Instance;}

	int GetTabFileCount(void);

	CTabFileEdit* GetTabFile(int nIndex);
	CTabFileEdit* GetTabFile(const char* pcszTabName);
	int GetTabFileIndex(const char* pcszTabName);

	TAB_FILE_CONFIG* GetTabFileConfig(int nIndex);

private:
	static CTabFileCenter			ms_Instance;

	std::vector<CTabFileEdit>		m_vecTabFile;
	std::vector<TAB_FILE_CONFIG>	m_vecTabFileConfig;
	std::map<std::string, int>		m_mapName2Index; 
};

#endif	// _TAB_FILE_H_